package moodish.client.gui;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

import moodish.client.gui.utils.MoodishLoader;
import moodish.client.user.User;

public class Feed extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private MoodishClientGui gui;
	
	public Feed(User user){
		
		setLayout(new GridLayout(0,3));
		String pathName = "./resources/mood.jpg";
		Loader loader = new Loader(false);
		loader.loadImage(pathName);
		add(loader);
		add(new JLabel(user.getNickName()));
		add(MoodishLoader.load(user.getMood()));
	}
	
	public void setGui(MoodishClientGui gui) {
		this.gui = gui;
	}
	
	public Feed(MoodishClientGui gui){
		this.setGui(gui);
	}

	public MoodishClientGui getGui() {
		return gui;
	}

}
